package org.liuyunfeng.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: TanJingyu
 * @create: 2022-05-07 10:33
 **/
@RestController
@RequestMapping("/ioc")
public class IocController {
    @Autowired
    private Student student;
    @Autowired
    private Student yfbStudent;

    @GetMapping
    public Object ioc() {
        return "success...";
    }

    @Bean
    public Student yfbStudent() {
        return new Student();
    }

    @Bean
    public Student student() {
        return new Student();
    }

    public static class Student {}
}

    